Skip to content

Conversation

@emily-shen
Copy link
Contributor

@emily-shen emily-shen commented Mar 27, 2025

this sets the name of the getPlatformProxy 'worker' to the provided worker name, so miniflare stops crashing when the proxy DO worker tries to bind to it.

Internal DOs still don't work, but at least it doesn't crash now? And it has a be

Fixes #8687


@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2025

🦋 Changeset detected

Latest commit: e9636eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-wrangler-8697

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8697/npm-package-wrangler-8697

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-wrangler-8697 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-workers-bindings-extension-8697 -O ./cloudflare-workers-bindings-extension.0.0.0-vb21be6f24.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vb21be6f24.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-create-cloudflare-8697 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-kv-asset-handler-8697

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-miniflare-8697

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-pages-shared-8697

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-unenv-preset-8697

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-vite-plugin-8697

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-vitest-pool-workers-8697

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-workers-editor-shared-8697

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-workers-shared-8697

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14174103654/npm-package-cloudflare-workflows-shared-8697

Note that these links will no longer work once the GitHub Actions artifact expires.


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 4.20250321.1
workerd 1.20250321.0 1.20250321.0
workerd --version 1.20250321.0 2025-03-21

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@emily-shen emily-shen marked this pull request as ready for review March 27, 2025 14:04
@emily-shen emily-shen requested a review from a team as a code owner March 27, 2025 14:04
@emily-shen emily-shen added the e2e Run wrangler + vite-plugin e2e tests on a PR label Mar 27, 2025
${localBindings.map((b) => `- ${JSON.stringify(b)}`).join("\n")}
These will not work in local development, but they should work in production.
If you want to develop these locally, you can define your DO "externally" in another worker.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defining a DO "in a worker" is confusing (at least to me)

Suggested change
If you want to develop these locally, you can define your DO "externally" in another worker.
If you want to develop these locally, you can define your DO "externally" in another wrangler configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 👇

If you want to develop these locally, you can define your DO in a separate Worker, specified by a separate configuration file.

tho it is not clear what the recommended thing to do would be when multiple DOs are defined. I'm assuming each DO in a separate Worker?

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 😄

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 27, 2025
@emily-shen
Copy link
Contributor Author

nvm the warning message is getting ridiculously long - i'm going to create a section in the docs to link to

@dario-piotrowicz
Copy link
Member

nvm the warning message is getting ridiculously long - i'm going to create a section in the docs to link to

There's already some content for the DO issue here: https://developers.cloudflare.com/workers/wrangler/api/#supported-bindings 🙂

@emily-shen
Copy link
Contributor Author

docs PR:
cloudflare/cloudflare-docs#21198

(sorry @dario-piotrowicz I didn't see your comment until after I finished 😅 )

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this @emily-shen 🙏

@CarmenPopoviciu CarmenPopoviciu added the blocked Blocked on other work label Mar 28, 2025
@CarmenPopoviciu
Copy link
Contributor

pending docs review and landing first, since this PR references the newly added section

@CarmenPopoviciu CarmenPopoviciu removed the blocked Blocked on other work label Mar 31, 2025
@CarmenPopoviciu
Copy link
Contributor

docs PR was merged. This is no longer blocked and I will proceed to merge it

@CarmenPopoviciu CarmenPopoviciu merged commit ec1f813 into main Mar 31, 2025
20 of 21 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the emily/DO branch March 31, 2025 15:19
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 31, 2025
CarmenPopoviciu added a commit that referenced this pull request Apr 1, 2025
…rnal DOs (#8713)

* pass name to getplatformproxy

* fixup

* remove out of date warning

* stop gpp crashing with internal DOs

* changeset

* fix e2e

* pr feedback

* elaborate on error message

* move to a docs link

* fix failing test

* copy improvement

* fix

* update docs link

* update link

---------

Co-authored-by: emily-shen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🐛 BUG: getPlatformProxy errors when there are DO

4 participants